﻿@using Known.Razor.Components
@using Microsoft.AspNetCore.Components.Routing
@inject Microsoft.JSInterop.IJSRuntime JS
@inherits BaseComponent

<CascadingValue Value="Context">
    <Router AppAssembly="typeof(App).Assembly">
        <Found Context="routeData">
            <RouteView RouteData="@routeData" />
        </Found>
        <NotFound>
            <Error Code="404" />
        </NotFound>
    </Router>
    <DialogContainer />
</CascadingValue>

@code {
    protected override void OnInitialized()
    {
        Context = new KRContext
        {
            UI = new UIService(JS)
        };
    }
}